-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(template): add Yarn files to .gitignore
#42313
feat(template): add Yarn files to .gitignore
#42313
Conversation
@@ -64,3 +64,11 @@ yarn-error.log | |||
|
|||
# testing | |||
/coverage | |||
|
|||
# Yarn | |||
.yarn/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which version of Yarn is creating those files? Asking as I never saw them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yarn v3, the one that is set by default in CLI starting from next version.
I don't have much experience with Yarn2+ personally, but isn't their recommendation to check in at least some of https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored (I don't like the churn this creates in userland code tbh, but we ought to have a justification for deviating from the packager's recommendation) |
Yeah, sure. I've taken this into account, and appropriate paths are added: react-native/packages/react-native/template/_gitignore Lines 70 to 74 in 420daf4
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, apologies, I misread the diff on mobile, didn't scroll past @cortinico's comment 😅. Yeah, this LGTM then.
I hope we can get pnpm support in to give folks a choice before the branch cut because I (personally) find modern Yarn a bit untidy in this respect, but that shouldn't block.
/rebase |
420daf4
to
978c2a9
Compare
Base commit: ea0e826 |
/rebase |
978c2a9
to
f632bbe
Compare
@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@cortinico merged this pull request in 965f2eb. |
Summary: Recently inside React Native Community CLI we added bumping Yarn version inside `init` command, more information here: react-native-community/cli#2134. In this Pull Request I added required rules in `.gitignore` for new projects created. ## Changelog: [GENERAL] [ADDED] - Add Yarn files to `.gitignore` in template Pull Request resolved: facebook/react-native#42313 Test Plan: 1. Follow [Contributing guide](https://github.com/react-native-community/cli/blob/main/CONTRIBUTING.md) from React Native Community CLI repository to setup locally newest version of CLI. 2. Run this command: ```sh node /path/to/react-native-cli/packages/cli/build/bin.js init --template path/to/template ``` 3. Appropriate should be ignored. Reviewed By: NickGerleman Differential Revision: D52907962 Pulled By: cortinico fbshipit-source-id: f12dce8836e7e94257f8c690434b11227aa46446 Original: facebook/react-native@965f2eb
Summary: Recently inside React Native Community CLI we added bumping Yarn version inside `init` command, more information here: react-native-community/cli#2134. In this Pull Request I added required rules in `.gitignore` for new projects created. ## Changelog: [GENERAL] [ADDED] - Add Yarn files to `.gitignore` in template Pull Request resolved: facebook/react-native#42313 Test Plan: 1. Follow [Contributing guide](https://github.com/react-native-community/cli/blob/main/CONTRIBUTING.md) from React Native Community CLI repository to setup locally newest version of CLI. 2. Run this command: ```sh node /path/to/react-native-cli/packages/cli/build/bin.js init --template path/to/template ``` 3. Appropriate should be ignored. Reviewed By: NickGerleman Differential Revision: D52907962 Pulled By: cortinico fbshipit-source-id: f12dce8836e7e94257f8c690434b11227aa46446 Original-Commit: facebook/react-native@965f2eb
Summary: Recently inside React Native Community CLI we added bumping Yarn version inside `init` command, more information here: react-native-community/cli#2134. In this Pull Request I added required rules in `.gitignore` for new projects created. ## Changelog: [GENERAL] [ADDED] - Add Yarn files to `.gitignore` in template Pull Request resolved: facebook/react-native#42313 Test Plan: 1. Follow [Contributing guide](https://github.com/react-native-community/cli/blob/main/CONTRIBUTING.md) from React Native Community CLI repository to setup locally newest version of CLI. 2. Run this command: ```sh node /path/to/react-native-cli/packages/cli/build/bin.js init --template path/to/template ``` 3. Appropriate should be ignored. Reviewed By: NickGerleman Differential Revision: D52907962 Pulled By: cortinico fbshipit-source-id: f12dce8836e7e94257f8c690434b11227aa46446 Original-Commit: facebook/react-native@965f2eb
Summary:
Recently inside React Native Community CLI we added bumping Yarn version inside
init
command, more information here: react-native-community/cli#2134. In this Pull Request I added required rules in.gitignore
for new projects created.Changelog:
[GENERAL] [ADDED] - Add Yarn files to
.gitignore
in templateTest Plan: